<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>增加住客信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="row">
    <div class="col-md-4 column">
        <a class="btn btn-primary" href="${pageContext.request.contextPath}/hotel/main">返回主界面</a>
    </div>
</div>
<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>已预订的房间为</small>
                </h1>
            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>房号</th>
                    <th>房间面积</th>
                    <th>房间类型</th>
                    <th>租金</th>
                    <th>房间状态</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="room" items="${requestScope.get('list')}">
                    <tr>
                        <td>${room.getRoomId()}</td>
                        <td>${room.getArea()}</td>
                        <td>${room.getRoomType()}</td>
                        <td>${room.getRentMoney()}</td>
                        <td>${room.getStated()}</td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
    <h1>请增加住客的信息</h1>
    <form action="${pageContext.request.contextPath}/hotel/addResident" method="post">
        预订房号：<input type="text" name="room_id"><br><br><br>
        身份证号：<input type="text" name="card_id"><br><br><br>
        姓名：<input type="text" name="name"><br><br><br>
        年龄：<input type="text" name="age"><br><br><br>
        性别：<input type="text" name="sex"><br><br><br>
        电话号码：<input type="text" name="telephone"><br><br><br>
        预付定金：<input type="text" name="subscription"><br><br><br>
        <input type="submit" value="加入住客">
    </form>

</div>